<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>企业备案信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
   <div class="Wrapper">
        <div class="sqPanel">
            <div class="sqPanel_head inL">
                <div class="btnsBox inLC">
                     <span id="cst_corp_team_add_btn_id" class="sq-button sq-button-round">添加</span>
                     <span id="cst_corp_team_modify_btn_id" class="sq-button sq-button-round">修改</span>
                </div>
                <span>主要团队成员</span>
            </div>
            <div class="sqPanel_body">
                <div id="ligergrid_members" class="sq-grid"></div>
            </div>
        </div>
        <div class="sqPanel">
            <div class="sqPanel_head inL">
                <div class="btnsBox inLC">
                    <span id="cst_corp_rl_comp_add_btn_id" class="sq-button sq-button-round">添加</span>
                    <span id="cst_corp_rl_comp_modify_btn_id" class="sq-button sq-button-round">修改</span>
                </div>
                <span>企业关联</span>
            </div>
            <div class="sqPanel_body">
                <div id="ligergrid_qiye" class="sq-grid"></div>
            </div>
        </div>
        <div class="sqPanel">
            <div class="sqPanel_head inL">
                <div class="btnsBox inLC">
                    <span id="cst_corp_shr_add_btn_id" class="sq-button sq-button-round">添加</span>
                    <span id="cst_corp_shr_modify_btn_id" class="sq-button sq-button-round">修改</span>
                </div>
                <span>股东信息</span>
            </div>
            <div class="sqPanel_body">
                <div id="ligergrid_gudong" class="sq-grid"></div>
            </div>
        </div>
        <div class="sqPanel">
            <div class="sqPanel_head inL">
                <div class="btnsBox inLC">
                    <span id="company_his_add_btn_id" class="sq-button sq-button-round">添加</span>
                    <span id="company_his_modify_btn_id" class="sq-button sq-button-round">修改</span>
                </div>
                <span>公司历史</span>
            </div>
            <div class="sqPanel_body">
                <div id="company_history_grid" class="sq-grid"></div>
            </div>
        </div>
    </div>
   
    
    <!-- hide data -->
	<div class="fieldBox col_100" style="display:none;">
		<div class="field">
		    <input name=cstId id="cstId" type="text" class="ui-textbox" value="${cstId}">
		</div>
	</div>
    
    <script>
    $(function() {
        
    	//新增主要人员
        $("#cst_corp_team_add_btn_id").click(function(event) {
            //如果客户ID不存在是不能新增的
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
            $.ligerDialog.SQopen({
                width: 800,
                height:400,
                title : '主要人员',
                urlParms:{cstId:_cstId},
                url:'<%=path%>/customer/cstcorpteam/toAddPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]

            });
        });
        
        //主要人员修改
        $("#cst_corp_team_modify_btn_id").click(function(event) {
        	//如果客户ID不存在是不能修改
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
        	var selectedRows = cstCorpTeamGrid.getSelectedRows();
    		if(selectedRows.length != 1){
    			UIUtils.alertWarning(LogUtils.LOG_CMM_SELECT_ONLY_A_ROW);
    			return;
    		}
    		
    		var _id = selectedRows[0].id;
        	
            $.ligerDialog.SQopen({
                width: 800,
                height:400,
                title : '主要人员',
                urlParms:{cstId:_cstId, ctId:_id},
                url:'<%=path%>/customer/cstcorpteam/toAddPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
        
        //关联企业新增
        $("#cst_corp_rl_comp_add_btn_id").click(function(event) {
        	//如果客户ID不存在是不能新增的
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
            $.ligerDialog.SQopen({
                width: 800,
                height:260,
                title : '企业关联',
                urlParms:{cstId:_cstId},
                url:'<%=path%>/customer/cstcorprlcomp/toAddPage.do?',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
        
      	//关联企业修改
        $("#cst_corp_rl_comp_modify_btn_id").click(function(event) {
        	//如果客户ID不存在是不能修改
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
        	var selectedRows = cstCorpRlCompGrid.getSelectedRows();
    		if(selectedRows.length != 1){
    			UIUtils.alertWarning(LogUtils.LOG_CMM_SELECT_ONLY_A_ROW);
    			return;
    		}
    		
    		var _id = selectedRows[0].id;
        	
            $.ligerDialog.SQopen({
                width: 800,
                height:260,
                title : '企业关联',
                urlParms:{cstId:_cstId,crcId:_id},
                url:'<%=path%>/customer/cstcorprlcomp/toAddPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
        
        //股东新增
        $("#cst_corp_shr_add_btn_id").click(function(event) {
        	//如果客户ID不存在是不能新增的
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
            $.ligerDialog.SQopen({
                width: 850,
                height:280,
                title : '股东信息',
                urlParms:{cstId:_cstId},
                url:'<%=path%>/customer/cstcorpshr/toAddPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]		
            });
        });
        
        //股东信息修改
        $("#cst_corp_shr_modify_btn_id").click(function(event) {
        	//如果客户ID不存在是不能修改
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
        	var selectedRows = cstCorpShrGrid.getSelectedRows();
    		if(selectedRows.length != 1){
    			UIUtils.alertWarning(LogUtils.LOG_CMM_SELECT_ONLY_A_ROW);
    			return;
    		}
    		
    		var _id = selectedRows[0].id;
        	
            $.ligerDialog.SQopen({
                width: 800,
                height:280,
                title : '股东信息',
                urlParms:{cstId:_cstId, ccsId:_id},
                url:'<%=path%>/customer/cstcorpshr/toAddPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) Dialog.onOk();
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
      
        //公司历史新增
        $("#company_his_add_btn_id").click(function(event) {
        	//如果客户ID不存在是不能新增的
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
        	$.ligerDialog.SQopen({
                width: 800,
                height:235,
                title : '公司历史',
                urlParms:{cstId:_cstId},
                url:'<%=path%>/customer/cstcorphis/toAddPage.do',
                // 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) {
                            	Dialog.onOk();
                            }
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
        
        //公司历史信息修改
        $("#company_his_modify_btn_id").click(function(event) {
        	//如果客户ID不存在是不能修改
        	var _cstId = $("#cstId").val();
        	if(!_cstId){
        		UIUtils.alertWarning(LogUtils.LOG_CUST_CONFIRM_HERE_HAS_INFO);
        		return; //验证不通过，不执行以下代码
        	}
        	
        	var selectedRows = companyHistoryGrid.getSelectedRows();
    		if(selectedRows.length != 1){
    			UIUtils.alertWarning(LogUtils.LOG_CMM_SELECT_ONLY_A_ROW);
    			return;
    		}
    		
    		var _id = selectedRows[0].id;
        	
    		$.ligerDialog.SQopen({
                width: 800,
                height:235,
                title : '公司历史',
                urlParms:{cstId:_cstId, id:_id},
                url:'<%=path%>/customer/cstcorphis/toAddPage.do',
                // 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "保存", type: 'ok', cls: 'l-dialog-btn-ok', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onOk = function () {}
                            if (Dialog.onOk) {
                            	Dialog.onOk();
                            }
                        }
                    }, {
                        text: "取消", type: 'cancel', cls: 'l-dialog-btn-no', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
        });
      
        var _cstId = $("#cstId").val();
      
        $("#ligergrid_members").ligerGrid({
            usePager: false,
            url: "<%=path%>/customer/cstcorpteam/initList.do?isEncrypt=1",
            urlParms:{cstId:_cstId},
            method : 'get',
            columns: [{
                display: '职务',
                isSort: false,
                name: 'mTypCdNm',
                width: 150,
                render: function (rowdata, rowindex, value, column) {
                	if(StringUtils.isEmpty(value)){
                		value = "";
                	}
            		var h = '';
        		    h='<a  href="javascript:cstCorpTeamDetail(';
                    h+="'"+rowdata.id+"'";
                    h+=')">'+value+'</a>'
                    return h;
        		}
            }, {
                display: '姓名',
                isSort: false,
                name: 'mnm',
                width: 150,
                render: function (rowdata, rowindex, value, column) {
                	if(StringUtils.isEmpty(value)){
                		value = "";
                	}
                	var h = value;
            		if(StringUtils.isNotEmpty(rowdata.rlCstId)){
            			 h='<a  href="javascript:toCstDetailBtnEvent(';
                         h+="'"+rowdata.rlCstId+"'";
                         h+=')">'+value+'</a>'
            		}
                    return h;
        		}
            }, {
                display: '手机号1',
                isSort: false,
                name: 'mp1',
                width: 150,
            }, {
                display: '手机号2',
                isSort: false,
                name: 'mp2',
                width: 150,
            }, {
                display: '性别',
                isSort: false,
                name: 'genderCdNm',
                width: 100
            }, {
                display: '出生日期',
                isSort: false,
                name: 'birthday',
                width: 120,
                render: function (rowdata, rowindex, value, column) {
 					var dateStr = "";
 					if(null != value){
 						var date = new Date(value);
 						dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
 					}
 					return dateStr;
        		}
            }, {
                display: '证件类型',
                isSort: false,
                name: 'certTypCdNm',
                width: 150
            }, {
                display: '证件号',
                isSort: false,
                name: 'certNo',
                width: 200
            }, {
                display: '备注',
                isSort: false,
                name: 'teamRem',
                minWidth: 300
            }, getGridTeamOperColumnContent()],
            width: '100%',
            height:260,
            //isScroll: false,
            rownumbers: true,
            root:'rows',
	        record:'total',
            onAfterShowData: function() {
                SetIframe_height();
            }
        });
        
        cstCorpTeamGrid = liger.get("ligergrid_members");
        
        $("#ligergrid_qiye").ligerGrid({
            usePager: false,
            url: "<%=path%>/customer/cstcorprlcomp/initList.do?isEncrypt=1",
            urlParms:{cstId:_cstId},
            method : 'get',
            columns: [{
                display: '关系',
                name: 'rlTypCdNm',
                width: 150
            }, {
                display: '名称',
                name: 'compNm',
                width: 150,
                render: function (rowdata, rowindex, value, column) {
            		var h = '';
        		    h='<a  href="javascript:cstCorpRlCompDetail(';
                    h+="'"+rowdata.id+"'";
                    h+=')">'+value+'</a>'
                    return h;
        		}
            }, {
                display: '法人代表',
                name: 'corpRep',
                width: 150,
            }, {
                display: '联系方式',
                name: 'tel',
                width: 200
            }, {
                display: '备注',
                name: 'rlRem',
                minWidth: 300
            }, getGridQiyeOperColumnContent()],
            width: '100%',
            height:260,
            //isScroll: false,
            rownumbers: true,
            root:'rows',
	        record:'total',
            onAfterShowData: function() {
                SetIframe_height();
            }
        });
        
        cstCorpRlCompGrid = liger.get("ligergrid_qiye");
        
        $("#ligergrid_gudong").ligerGrid({
            usePager: false,
            url: "<%=path%>/customer/cstcorpshr/initList.do?isEncrypt=1",
            urlParms:{cstId:_cstId},
            method : 'get',
            columns: [{
                display: '股东类型',
                name: 'shrTypCdNm',
                width: 120,
                render: function (rowdata, rowindex, value, column) { 
                	if(StringUtils.isEmpty(value)){
                		value = "";
                	}
            		var h = '';
        		    h='<a  href="javascript:cstCorpShrDetail(';
                    h+="'"+rowdata.id+"'";
                    h+=')">'+value+'</a>'
                    return h;
        		}
            }, {
                display: '名称',
                name: 'shrNm',
                width: 120,
                render: function (rowdata, rowindex, value, column) { 
                	if(StringUtils.isEmpty(value)){
                		value = "";
                	}
            		var h = value;
            		if(StringUtils.isNotEmpty(rowdata.rlCstId)){
            			 h='<a  href="javascript:toCstDetailBtnEvent(';
                         h+="'"+rowdata.rlCstId+"'";
                         h+=')">'+value+'</a>'
            		}
                    return h;
        		}
            }, {
                display: '证件类型',
                name: 'certTypCdNm',
                width: 120,
            }, {
                display: '证件号',
                name: 'certNo',
                width: 120
            }, {
                display: '出资情况(万元)',
                name: 'cntrAmt',
                width: 120
            }, {
                display: '出资方式',
                name: 'contrWay',
                width: 120
            }, {
                display: '出资日期',
                name: 'contrDt',
                width: 120,
                render:function (rowdata, rowindex, value, column) {
                	return DateUtils.formatDateToString(value, DateUtils.YYYY_MM_DD);
                }
            }, {
                display: '出资比例(%)',
                name: 'equPropPct',
                minWidth: 120
            }, getGridGudongOperColumnContent()],
            width: '100%',
            height:260,
            //isScroll: false,
            root:'rows',
	        record:'total',
            rownumbers: true,
            onAfterShowData: function() {
                SetIframe_height();
            }
        });
        cstCorpShrGrid = liger.get("ligergrid_gudong");
        
        //====================公司历史 开始============================
        $("#company_history_grid").ligerGrid({
            usePager: false,
            url: "<%=path%>/customer/cstcorphis/initList.do",
            urlParms:{cstId:_cstId},
            method : 'get',
            columns: [{
                display: '项目名称',
                isSort: false,
                name: 'prjNm',
                width: 150,
                render: function (rowdata, rowindex, value, column) {
            		var h = '';
        		    h='<a  href="javascript:companyHistoryRowDetail(';
                    h+="'"+rowdata.id+"'";
                    h+=')">'+value+'</a>'
                    return h;
        		}
            }, {
                display: '开始时间',
                isSort: false,
                name: 'startDt',
                width: 150,
                render:function (rowdata, rowindex, value, column) {
                	return DateUtils.formatDateToString(value, DateUtils.YYYY_MM_DD);
                }
            }, {
                display: '结束时间',
                isSort: false,
                name: 'endDt',
                width: 150,
                render:function (rowdata, rowindex, value, column) {
                	return DateUtils.formatDateToString(value, DateUtils.YYYY_MM_DD);
                }
            }, {
                display: '项目内容',
                isSort: false,
                name: 'prjDesc',
                width: 200,
                render: function (rowdata, rowindex, value){
                    return UIUtils.showColumnTip(value);
                }

            }, getCompanyHistoryGridColumnContent()],
            width: '100%',
            height:260,
            //isScroll: false,
            rownumbers: true,
            root:'rows',
	        record:'total',
            onAfterShowData: function() {
                SetIframe_height();
            }
        });
        
        companyHistoryGrid = liger.get("company_history_grid");
        //====================公司历史 结束============================
        //修改初始化数据
        initData();
    });
    
    //法人公司信息详情
    function companyHistoryRowDetail(_id){
    	$.ligerDialog.SQopen({
            width: 800,
            height:235,
            title : '公司历史',
            urlParms:{id:_id},
            url:'<%=path%>/customer/cstcorphis/toDetailPage.do',
            // 自定义buttons的时候 不要设置 fixButtons: true
            buttons: [{
                    text: "关闭", type: 'cancel', 
                    onclick: function (item, Dialog) {
                        //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    }
    
    //股东信息详情
    function cstCorpShrDetail(_id){
            $.ligerDialog.SQopen({
                width: 600,
                height:290,
                title : '股东信息',
                urlParms:{ccsId:_id},
                url:'<%=path%>/customer/cstcorpshr/toDetailPage.do',
             	// 自定义buttons的时候 不要设置 fixButtons: true
                buttons: [{
                        text: "关闭", type: 'cancel', 
                        onclick: function (item, Dialog) {
                            //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                            if (Dialog.onCancel) Dialog.onCancel();
                        }
                    }
                ]
            });
    }
    
    //主要成员详情
    function cstCorpTeamDetail(_id){
    	$.ligerDialog.SQopen({
            width: 800,
            height:400,
            title : '主要人员',
            urlParms:{ctId:_id},
            url:'<%=path%>/customer/cstcorpteam/toDetailPage.do',
         	// 自定义buttons的时候 不要设置 fixButtons: true
            buttons: [{
                    text: "关闭", type: 'cancel', 
                    onclick: function (item, Dialog) {
                        //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    }
    
    
    //关联企业详情
    function cstCorpRlCompDetail(_id) {
        $.ligerDialog.SQopen({
            width: 800,
            height:260,
            title : '关联企业',
            urlParms:{crcId:_id},
            url:'<%=path%>/customer/cstcorprlcomp/toDetailPage.do?isEncrypt=1',
         	// 自定义buttons的时候 不要设置 fixButtons: true
            buttons: [{
                    text: "关闭", type: 'cancel', 
                    onclick: function (item, Dialog) {
                        //在子页面里绑定 frameElement.dialog.onCancel = function () {}
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    };
    
    //公司历史操作列
    function getCompanyHistoryGridColumnContent(){
    	var obj = {
                display: '操作',
                isSort: false,
                width: 100,
                render: function (rowdata, rowindex, value){
                	var h='<a class="sq-button-hasicon" href="javascript:deleteCompanyHistoryGridRow(';
                    h+="'"+rowdata.id+"'";
                    h+=",'ligergrid_A1'"
                    h+=')"><i class="sqBtnIco_7"></i>删除</a>'
                	return h;
                }
            };
        	
        	return obj;
    }
    
    
    //隐藏掉操作列
    function getGridTeamOperColumnContent(){
    	var obj = {
            display: '操作',
            isSort: false,
            width: 100,
            render: function (rowdata, rowindex, value){
            	if(rowdata.mtypCd != 1 && rowdata.mtypCd != 7 && rowdata.mtypCd != 10){
            		var h='<a class="sq-button-hasicon" href="javascript:deleteCorpTeamRow(';
                    h+="'"+rowdata.id+"'";
                    h+=",'ligergrid_A1'"
                    h+=')"><i class="sqBtnIco_7"></i>删除</a>'
                	return h;
            	}
            }
        };
    	
    	return obj;
	}
    
    //隐藏掉操作列
    function getGridQiyeOperColumnContent(){
    	var obj = {
                display: '操作',
                isSort: false,
                width: 100,
                render: function (rowdata, rowindex, value){
                    // return '<a href="javascript:deleteRow("' + rowdata.CustomerID + '")">删除</a>';
                    var h='<a class="sq-button-hasicon" href="javascript:deleteQyRow(';
                        h+="'"+rowdata.id+"'";
                        h+=",'ligergrid_qiye'"
                        h+=')"><i class="sqBtnIco_7"></i>删除</a>'
                    return h;
                }
            };
    	
    	return obj;
	}
    
    //隐藏掉操作列
    function getGridGudongOperColumnContent(){
    	var obj = {
                display: '操作',
                isSort: false,
                width: 100,
                render: function (rowdata, rowindex, value){
                    var h='<a class="sq-button-hasicon" href="javascript:deleteGdRow(';
                        h+="'"+rowdata.id+"'";
                        h+=",'ligergrid_gudong'"
                        h+=')"><i class="sqBtnIco_7"></i>删除</a>'
                    return h;
                }
            };
    	return obj;
	}
    
    //初始化数据
    function initData(){
    	
	}
    
    //删除公司历史
    function deleteCompanyHistoryGridRow(_id){
    	var cstId = $("#cstId").val();
    	if(!cstId){
    		$.ligerDialog.SQalert({content: LogUtils.LOG_CUST_ID_NOT_EMPTY, SQ_type: "warning"});
    		return;
    	}
    	$.ligerDialog.SQconfirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
			if(flag == false)return;
			var _url = '<%=path%>/customer/cstcorphis/removeById.do';
			AjaxUtils.ajaxPost(_url, {id:_id}, function(msg){
				if(msg.success == 1){
					UIUtils.alertSuccess(msg.info);
					companyHistoryGrid.reload();
     			 }else{
     				UIUtils.alertError(msg.info);
     			 }
			}, true);
		});
    }
    
  	//删除团队成员信息
    function deleteCorpTeamRow (ctId, gridId) {
    	var cstId = $("#cstId").val();
    	if(!cstId){
    		$.ligerDialog.SQalert({content: LogUtils.LOG_CUST_ID_NOT_EMPTY, SQ_type: "warning"});
    		return;
    	}
		$.ligerDialog.SQconfirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
			if(flag == false)return;
			var _url = '<%=path%>/customer/cstcorpteam/removeById.do';
			AjaxUtils.ajaxPost(_url, {id:ctId}, function(msg){
				if(msg.success == 1){
					UIUtils.alertSuccess(msg.info);
					cstCorpTeamGrid.reload();
	     		 }else{
	     			UIUtils.alertError(msg.info);
	     		 }
			}, true);
		});
    }
  	
    //删除团队成员信息
    function deleteQyRow (crcId, gridId) {
    	var cstId = $("#cstId").val();
    	if(!cstId){
    		$.ligerDialog.SQalert({content: LogUtils.LOG_CUST_ID_NOT_EMPTY, SQ_type: "warning"});
    		return;
    	}
		$.ligerDialog.SQconfirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
			if(flag == false)return;
			var _url = '<%=path%>/customer/cstcorprlcomp/removeById.do';
			AjaxUtils.ajaxPost(_url, {id:crcId}, function(msg){
				if(msg.success == 1){
					UIUtils.alertSuccess(msg.info);
					cstCorpRlCompGrid.reload();
	     		 }else{
	     			UIUtils.alertError(msg.info);
	     		 }
			}, true);
		});
    }
    //删除股东信息
    function deleteGdRow (ccsId, gridId) {
    	var cstId = $("#cstId").val();
    	if(!cstId){
    		$.ligerDialog.SQalert({content: LogUtils.LOG_CUST_ID_NOT_EMPTY, SQ_type: "warning"});
    		return;
    	}
    	$.ligerDialog.SQconfirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
			if(flag == false)return;
				var _url = '<%=path%>/customer/cstcorpshr/removeById.do';
				AjaxUtils.ajaxPost(_url, {id:ccsId}, function(msg){
					if(msg.success == 1){
						UIUtils.alertSuccess(msg.info);
						cstCorpShrGrid.reload();
		     		 }else{
		     			UIUtils.alertError(msg.info);
		     		 }
				}, true);
    	});
    }
    
    //到客户查看页面
    function toCstDetailBtnEvent(_cstId){
    	Add_navTab('tab_cst_detail'+_cstId,'客户详情','<%=path%>/customer/cstbscinfo/toCustDetailPage.do?id='+_cstId);
    }
    
    </script>
</body>
</html>